package com.lang.maths;

public class FindPowerExample {
	public static void main(String[] args) {

		/*
		 * To find a value raised to power of another value, use static double
		 * pow(double d1, double d2) method of Java Math class.
		 */

		// returns 2 raised to 2, i.e. 4
		System.out.println(Math.pow(2, 2));

		// returns -3 raised to 2, i.e. 9
		System.out.println(Math.pow(-3, 2));
	}
}
